/**
 * \file Notification.h
 * \brief Notification definition class.
 * \author Edouard ROGE
 * \date 10 august 2012
 */

#ifndef _NOTIFICATION_
#define _NOTIFICATION_

#include "Core/Memory/HeapObject.h"

namespace Core
{
	namespace Notification
	{
		class NotificationHandler;

		/**
		* \enum NotificationType
		* \brief All kind of notification
		*/
		enum NotificationType
		{
			Unknown = 0,
			Log,
			Count
		};

		/**
		 * \class Notification
		 * \brief Base class for a notification
		 */
		class Notification : public Memory::HeapObject
		{
		public:

			/**
			 * \fn Notification();
			 * \brief Default constructor
			 */
			Notification();

			/**
			 * \fn Notification(NotificationHandler * _pSender, NotificationType _type);
			 * \param _pSender Notification sender
			 * \param _type type of notification
			 * \brief Constructor
			 */
			Notification(NotificationHandler * _pSender, NotificationType _type);

			/**
			 * \fn ~Notification();
			 * \brief Destructor
			 */
			~Notification();

			/**
			 * \fn inline NotificationHandler * GetSender() const
			 * \return the sender
			 * \brief Look up the sender of the notification
			 */
			inline NotificationHandler * GetSender() const { return m_pSender; }

			/**
			 * \fn inline const NotificationType & GetType() const
			 * \return the type notification
			 * \brief Look up the kind of notification
			 */
			inline const NotificationType & GetType() const { return m_Type; }

		protected:

			/** type of notification */
			NotificationType m_Type;

			/** notification sender */
			NotificationHandler * m_pSender;

		};
	}
}
#endif // _NOTIFICATION_
